package com.xieyong.leetcode;

public class Leetcode3330 {
    public static void main(String[] args) {
        Leetcode3330 leetcode3330 = new Leetcode3330();
        String word = "abbcccc";
        int i = leetcode3330.possibleStringCount(word);
        System.out.println(i);
    }

    public int possibleStringCount(String word) {
        int ans = 1;
        for(int i=1; i<word.length(); i++){
            if(word.charAt(i)==word.charAt(i-1)){
                ans++;
            }
        }
        return ans;
    }
}
